import * as request from "@/utils/request";
export function getUserList(){
    return request.get('/user/list')
}
export function saveUser(data:any){
    console.log(data)
    return request.post('/user/save',data)
}
export function updateUserPwd(data:any){
    return request.post('/user/update/pwd',data)
}
//上传头像
export function updateAvatar(data:any){
    return request.post('/user/update/avatar',data)
}
//分页查询用户信息
export function getUserPage(data:any){
    return request.post('/user/list/page',data)
}
//检查用户姓名
export function checkUserName(data:any){
    return request.post('/user/check/name',data)
}
//根据id获取user信息
export function getUserById(data:any){
    return request.get('/user/'+data)
}
//删除或批量删除用户
export function deleteUser(data:any){
    return request.post('/user/delete',data)
}
//重置用户密码
export function resetUserPwd(data:any){
    return request.get('/user/reset/pwd/'+data)
}
//更改用户状态
export function updateUserStatus(data:any){
    return request.get('/user/update/status/'+data.id+'/'+data.status)
}